<template>
  <view>
    <swiper class="swiper" circular :autoplay="true" :interval="3000" :duration="1000" style="width: 690rpx; height: 280rpx">
      <swiper-item style="width: 100%; height: 100%" @click="godetail(item)" v-for="item in swiperlist" :key="item.id">
        <image :src="img_url + item.image" style="width: 100%; height: 100%" mode="aspectFill"></image>
      </swiper-item>
    </swiper>
  </view>
</template>

<script>
export default {
  props: {
    swiperlist: {
      type: Array,
      default: []
    }
  },
  data() {
    return {
      img_url: this.img_url
    };
  },
  methods: {
    //轮播详情
    godetail(item) {
      console.log('轮播详情', item);
      uni.navigateTo({
        url: '/index/swiperdetail/swiperdetail?data=' + item.content
      });
    }
  }
};
</script>

<style lang="scss" scoped></style>
